﻿CREATE TABLE [dbo].[WardPatient] (
    [Id]                INT           IDENTITY (1, 1) NOT NULL,
    [PatientId]         NVARCHAR (50) NULL,
    [BedLabel]          NVARCHAR (50) NULL,
    [VisitId]           NVARCHAR (50) NULL,
    [WardCode]          NVARCHAR (50) NULL,
    [WardName]          NVARCHAR (50) NULL,
    [WardExtentCode]    NVARCHAR (50) NULL,
    [WardExtentName]    NVARCHAR (50) NULL,
    [Name]              NVARCHAR (50) NULL,
    [Sex]               NVARCHAR (50) NULL,
    [Age]               NVARCHAR (50) NULL,
    [DateOfBirth]       NVARCHAR (50) NULL,
    [AdmissionDateTime] NVARCHAR (50) NULL,
    [Diagnosis]         NVARCHAR (50) NULL,
    [NursingClassValue] NVARCHAR (50) NULL,
    [NursingClass]      NVARCHAR (50) NULL,
    [RecCreateDt]       DATETIME      NOT NULL,
    [RecStatus]         INT           NOT NULL,
    CONSTRAINT [PK__WardPati__3214EC073D2915A8] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'主键，自增长', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病人ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'PatientId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'床号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'BedLabel';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'住院次数', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'VisitId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病区代码', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'WardCode';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病区名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'WardName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'分区代码', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'WardExtentCode';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'分区名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'WardExtentName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'Name';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病人性别:1 男  2 女  3其他', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'Sex';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'病人年龄', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'Age';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'出生日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'DateOfBirth';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'入院时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'AdmissionDateTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'入院诊断', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'Diagnosis';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'护理级别：0 1 2 3 对应 特级 一级 二级 三级', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'NursingClassValue';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'护理级别名称：特级，一级，二级，三级', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'WardPatient', @level2type = N'COLUMN', @level2name = N'NursingClass';

